EMBED | NN 3 IE 4 DOM n/a | ||||
The EMBED object reflects the EMBED element. This object is treated differently in Navigator and Internet Explorer. In Navigator, the object exposes the properties and methods of the plugin that plays the media loaded into the EMBED element. As a result, the precise set of properties and methods varies with the plugin being used for the multimedia content (and is not shown in the lists below). Access to the object is via the element's name. IE, on the other hand, is more straightforward in its treatment of the object as just another element with its unique set of properties and methods (listed below). This means, however, that IE cannot control the plugin through scripting as Navigator can. | |||||
HTML Equivalent<EMBED> | |||||
Object Model Reference
|
accessKey | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
A single character key that brings focus to an element. The browser
and operating system determine whether the user must press a modifier
key (e.g., | |||
Exampledocument.all.myEmbed.accessKey = "n" | |||
Value Single alphanumeric (and punctuation) keyboard character. | |||
|
clientHeight, clientWidth | NN n/a IE 4 DOM n/a | ||
Read-only | |||
According to Microsoft's developer documentation, these properties reflect the height and width (in pixels) of the element's content. | |||
Examplevar midHeight = document.all.myEmbed.clientHeight/2 | |||
Value Integer pixel value. | |||
|
clientLeft, clientTop | NN n/a IE 4 DOM n/a | ||
Read-only | |||
According to Microsoft's developer documentation, these properties reflect the distance between the "true" left and top edges of the document area and the edges of the element. To get or set the pixel position of an element in the document, use the pixelLeft and pixelTop properties. | |||
Value A string value for a length in a variety of units or percentage. | |||
|
name | NN 4 IE 4 DOM n/a | ||
Read/Write (IE) | |||
The name property is part of Navigator's way of referencing the object. The value of the property, however, cannot be retrieved through the object itself, since the only properties that are returned are those of the plugin that plays the multimedia content. In IE, however, the property is available for reading and writing. | |||
Exampledocument.all.myEmbed.name = "tunes" | |||
Value Case-sensitive identifier that follows the rules of identifier naming: it may contain no whitespace, cannot begin with a numeral, and should avoid punctuation except for the underscore character. | |||
|
palette | NN n/a IE 4 DOM n/a | ||
Read-only | |||
Returns the setting of the PALETTE attribute of the EMBED object. | |||
Value String. | |||
|
pluginspage | NN n/a IE 4 DOM n/a | ||
Read-only | |||
The URL for downloading and installing the plugin necessary to run the current object's embedded data. | |||
Value A complete or relative URL as a string. | |||
|
readyState | NN n/a IE 4 DOM n/a | ||
Read-only | |||
Returns the current download status of the embedded content. This property provides a more granular way of testing whether a particular downloadable element is ready to be run or scripted instead of the onLoad event handler for the entire document. As the value of this property changes during loading, the system fires an onReadyStateChange event. | |||
Exampleif (document.contentsMap.readyState == "uninitialized") { } | |||
Value Unlike the document object's version of this property, the EMBED object's values are integers. As can best be determined: 0 means uninitialized; 1 means loading; and 4 means complete. | |||
|
src | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
URL of the external content file associated with the object. To change the content, assign a new URL to the property. | |||
Exampledocument.all.myEmbed.src = "tunes/dannyboy.wav" | |||
Value Complete or relative URL as a string. | |||
|
tabIndex | NN n/a IE 4 DOM 1 | ||
Read/Write | |||
A number that indicates the sequence of this element within the tabbing order of all focusable elements in the document. Tabbing order follows a strict set of rules. Elements that have values other than zero assigned to their tabIndex properties are first in line when a user starts tabbing in a page. Focus starts with the element with the lowest tabIndex value and proceeds in order to the highest value, regardless of physical location on the page or in the document. If two elements have the same tabIndex values, the element that comes earlier in the document receives focus first. Next come all elements that either don't support the tabIndex property or have the value set to zero. These elements receive focus in the order in which they appear in the document. A value of -1 removes the element from tabbing order altogether. Note that the Macintosh user interface does not provide for giving focus to elements other than text and password INPUT fields. | |||
Exampledocument.all.myEmbed.tabIndex = 6 | |||
Value Integer. | |||
|
units | NN n/a IE 4 DOM n/a | ||
Read/Write | |||
The unit of measure for the height and width dimensions of the element. Internet Explorer appears to treat all settings as pixels. | |||
Exampledocument.all.myEmbed.units = "ems" | |||
Value Any of the following case-insensitive constants (as a string): pixels | px | em. | |||
|
blur( ) | NN n/a IE 4 DOM n/a |
Removes focus from the current element and fires an onBlur event (in IE). No other element necessarily receives focus as a result. | |
Returned Value None. | |
Parameters None. |
focus( ) | NN n/a IE 4 DOM n/a |
Gives focus to the current element and fires the onFocus event (in IE). If another element had focus at the time, it receives an onBlur event. | |
Returned Value None. | |
Parameters None. |